package com.example.myproject.client;

public class gridLayout2 extends myGrid{
	/*griLayoutx is merely a way to set the patterns for each
	 * configuration.  It will go through, set each cell in a grid to available 
	 * for 'x'.  if it is a plain module, it also adds it to the avaiable queue
	 * since plains need to be set first.
	 */	
	public gridLayout2()
	{
		//init main components
		super();
		
		for(int i = 43; i<= 57; i++ )
		{
			layout[i][20].availFor[plain] = true;
			availCells.add(layout[i][20]);
		}
		for(int i = 21; i<= 26; i++ )
		{
			layout[43][i].availFor[plain] = true;
			availCells.add(layout[43][i]);
		}
		for(int i = 44; i<= 57; i++ )
		{
			layout[i][26].availFor[plain] = true;
			availCells.add(layout[i][26]);
		}
		for(int i = 25; i>= 21; i-- )
		{
			layout[57][i].availFor[plain] = true;
			availCells.add(layout[57][i]);
		}
		
		layout[44][19].availFor[gym] = true;
		layout[45][19].availFor[sanit] = true;
		layout[46][19].availFor[sanit] = true;
		layout[47][19].availFor[sanit] = true;
		layout[49][19].availFor[power] = true;
		layout[50][19].availFor[air] = true;
		layout[51][19].availFor[med] = true;
		layout[53][19].availFor[gym] = true;
		layout[54][19].availFor[sanit] = true;
		layout[55][19].availFor[sanit] = true;
		layout[56][19].availFor[control] = true;
		
		layout[42][21].availFor[control] = true;
		layout[44][21].availFor[dorm] = true;
		layout[45][21].availFor[dorm] = true;
		layout[46][21].availFor[dorm] = true;
		layout[47][21].availFor[dorm] = true;
		layout[48][21].availFor[dorm] = true;
		layout[49][21].availFor[dorm] = true;
		layout[50][21].availFor[food] = true;
		layout[51][21].availFor[canteen] = true;
		layout[52][21].availFor[food] = true;
		layout[53][21].availFor[dorm] = true;
		layout[54][21].availFor[dorm] = true;
		layout[55][21].availFor[dorm] = true;
		layout[56][21].availFor[dorm] = true;
		layout[58][21].availFor[power] = true;		
		
		layout[42][22].availFor[med] = true;
		layout[44][22].availFor[food] = true;
		layout[56][22].availFor[food] = true;
		layout[58][22].availFor[food] = true;
	
		layout[42][23].availFor[air] = true;
		layout[44][23].availFor[canteen] = true;
		layout[56][23].availFor[canteen] = true;
		layout[58][23].availFor[air] = true;
	
		layout[42][24].availFor[food] = true;
		layout[44][24].availFor[food] = true;
		layout[56][24].availFor[food] = true;
		layout[58][24].availFor[med] = true;		
	
		layout[42][25].availFor[power] = true;
		layout[44][25].availFor[dorm] = true;
		layout[45][25].availFor[dorm] = true;
		layout[46][25].availFor[dorm] = true;
		layout[47][25].availFor[dorm] = true;
		layout[48][25].availFor[food] = true;
		layout[49][25].availFor[canteen] = true;
		layout[50][25].availFor[food] = true;
		layout[51][25].availFor[dorm] = true;
		layout[52][25].availFor[dorm] = true;
		layout[53][25].availFor[dorm] = true;
		layout[54][25].availFor[dorm] = true;
		layout[55][25].availFor[dorm] = true;
		layout[56][25].availFor[dorm] = true;
		layout[58][25].availFor[control] = true;		
		
		layout[44][27].availFor[control] = true;
		layout[45][27].availFor[sanit] = true;
		layout[46][27].availFor[sanit] = true;
		layout[47][27].availFor[gym] = true;
		layout[49][27].availFor[med] = true;
		layout[50][27].availFor[air] = true;
		layout[51][27].availFor[power] = true;
		layout[53][27].availFor[sanit] = true;
		layout[54][27].availFor[sanit] = true;
		layout[55][27].availFor[sanit] = true;
		layout[56][27].availFor[gym] = true;
		
		//set all non-plain modules in the avail list
		setAvailCells();
	}

}
